package com.wd.car.view.activity

import android.widget.Toast
import com.alibaba.android.arouter.launcher.ARouter
import com.wd.base.BaseActivity
import com.wd.base.MyViewModel
import com.wd.car.R
import com.wd.car.databinding.ActivityMainBinding


class MainActivity : BaseActivity<MyViewModel,ActivityMainBinding>(R.layout.activity_main) {
    override fun dataObserver() {

    }

    override fun initView() {
        dataBinding.btnLogin.setOnClickListener {
            if (!dataBinding.checkbox.isChecked) {
                dataBinding.landTips.visibility = android.view.View.VISIBLE
            }else {
                ARouter.getInstance().build("/activity/homeactivity").withString("qweqe","qweqe").navigation()
                Toast.makeText(this, "登录成功", Toast.LENGTH_SHORT).show()
            }
        }
        dataBinding.checkbox.setOnClickListener {
            dataBinding.landTips.visibility = android.view.View.GONE
        }
    }
}